package com.coincalf.web;

import com.coincalf.framework.security.UserDetails;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

@RestController
@RequestMapping("/user")
public class IndexController {

    @GetMapping("/info")
    Object info(@ApiIgnore @AuthenticationPrincipal UserDetails userDetails) {
        return userDetails;
    }

}
